import Vue from 'vue'
import VueRouter from 'vue-router'

import index from '@/pages/index.vue';
import List from '@/pages/List.vue';
import City from '@/pages/City.vue';
import Search from '@/pages/Search.vue';
import Detail from '@/pages/Detail.vue';

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'index',
    component: index,
  },
  {
    path: '/list',
    name: 'List',
    component: List,
  },
  {
    path: '/detail',
    name: 'Detail',
    component: Detail,
  },
  {
    path: '/city',
    name: 'City',
    component: City,
  },
  {
    path: '/search',
    name: 'Search',
    component: Search,
  },
];

const router = new VueRouter({
  routes
})

export default router
